package com.yeyks.consumer.dal.dao;

import com.yeyks.consumer.dal.domain.Feedback;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;


/**
 * <p>
 * 反馈表 Mapper 接口
 * </p>
 *
 * @author yun
 * @since 2019-06-25
 */
public interface FeedbackMapper extends BaseMapper<Feedback> {

    List<Feedback> selectByDateNameReaded(
            @Param("gmtStart") Date gmtStart,
            @Param("gmtEnd") Date gmtEnd,
            @Param("user") String user,
            @Param("readed") Boolean readed,
            @Param("report") Boolean report,
            @Param("offset") Integer offset,
            @Param("maxrow") Integer maxrow);

    Integer selectByDateNameReadedCount(
            @Param("gmtStart") Date gmtStart,
            @Param("gmtEnd") Date gmtEnd,
            @Param("user") String user,
            @Param("readed") Boolean readed,
            @Param("report") Boolean report);

    int markReaded(@Param("id") Integer id);

    int insertReturnId(Feedback record);

    int deleteByPrimaryKey(Integer id);

    Feedback selectByPrimaryKey(Integer id);

    List<Feedback> selectAll();

    int updateByPrimaryKey(Feedback record);
}
